Skip to content

New tool: Multihaul #1484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 139 commits into
base: master
Choose a base branch
from
Open

New tool: Multihaul #1484

wants to merge 139 commits into from

Conversation

LoireLab
Copy link

@LoireLab LoireLab commented Jul 21, 2025

This tool allows dwarves to collect several adjacent items at once when performing hauling jobs with a wheelbarrow. When enabled, new StoreItemInStockpile jobs will automatically attach nearby items so they can be hauled in a single trip.
Items claimed by another jobs would be ignored. The script only triggers when a wheelbarrow is definitively attached to the job. By default, up to ten additional items within 10 tiles of the original item are collected.

  1. Destination stockpile filters are currently ignored by the job. Which items qualify can be controlled with the --mode option.
  2. To overcome basic limitation of wheelbarrows (like being used only with really heavy items), script attaches wheelbarrows to any stockpile hauling job it can. It could be disabled via --autowheelbarrows off

P.S.: this is my first attempt on committing anything to a big project, so I would appreciate patience and guidance :)

LoireLab added 30 commits July 19, 2025 19:19
Add chronicle.lua fortress chronicle script
Add chronicle.lua fortress chronicle script
Fix chronicle year_tick and re-enable hooks
…ck-error

Fix chronicle artifact timestamp
Disable heavy scanning in chronicle
Add artifact and invasion tracking to chronicle
Tie holy-war to deity spheres and grudges
…t-issues

Add empty chronicle notice and item creation events
Summarize non-artifact item creation
Fix holy-war output for unnamed civs
@LoireLab
Copy link
Author

pre-commit.ci autofix

@LoireLab LoireLab marked this pull request as draft July 22, 2025 22:03
@LoireLab LoireLab marked this pull request as ready for review July 23, 2025 00:09
@LoireLab
Copy link
Author

If there is a better way to cycle through items than my for_each_item_in_radius — please let me know

@LoireLab
Copy link
Author

pre-commit.ci autofix

Copy link
Member

@chdoc chdoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, I think this is a very interesting idea 👍

This pull-request contains a whopping 139 commits, many of them are merge-commits and/or completely unrelated to the thing you are trying to add. If you want to preserve your own local history, that is fine, but please create pull-requests from cleaned-up branches containing only commits pertaining to the feature being added, preferably a single commit at the point where the pull-request is created.

I haven't looked in detail at the actual code. At first glance, it looks pretty reasonable. I will take a more detailed look, once the commit history has been cleaned up.


.. dfhack-tool::
:summary: Haulers gather multiple nearby items when using wheelbarrows.
:tags: fort productivity items stockpile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this actually changes gameplay mechanics rather than just automating existing mechanics, I think this should be gameplay rather than productivity.

they can be hauled in a single trip. Jobs without wheelbarrows would try to attach one if autowheelbarrows option is on.
Items claimed by another jobs or already stored in stockpiles would be ignored.
By default, up to ten additional items within 10 tiles of the original item are collected.
Warning: Destination stockpile filters are currently ignored by the job (because of DF logic). Which items qualify can be controlled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be highly desirable for the tool to respect the stockpile settings. Can you elaborate on what the issue is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants